package com.example.demo1.mapper;

import com.example.demo1.entity.BaRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BaRoleMapper {

    int deleteByPrimaryKey(Integer roleId);

    int insert(BaRole record);

    int insertSelective(BaRole record);

    BaRole selectByPrimaryKey(Integer roleId);

    int updateByPrimaryKeySelective(BaRole record);

    int updateByPrimaryKey(BaRole record);

    List<BaRole> selectRolesByRoleName(@Param("roleName") String roleName);

    List<BaRole> getAllRoles();

    BaRole selectRoleByRoleName(@Param("roleName") String roleName);

    BaRole selectRoleByRoleNameNotSelf(@Param("roleName") String roleName, @Param("roleId") Integer roleId);

}